<template>
  <el-input
    v-model="input"
    style="width: 230px;"
    placeholder="请输入"
    clearable
    @blur="handleBlur()"
  />
</template>

<script>
export default defineComponent({
  emits: ['handleBlur'],
  props: {
    index: {
      type: Number,
      default: 0
    },
    itemData: {
      type: Object,
      default: {}
    },
    value:{
      type:[String,Number],
      default:''
    }
  },
  setup(props, context) {
    const input = ref(props.value)
    const handleBlur = () => {
      context.emit('handleBlur', input, props.index, props.itemData)
    }
    return {
      input,
      handleBlur
    }
  },
});
</script>

<style lang="scss" scoped>

</style>
